package pro.survey.analyzer.lectors.window;

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.stage.Stage;
import pro.survey.analyzer.GUIGenerator;
import pro.survey.analyzer.Trans;

/**
 *
 * @author Adrian
 */
public class ButtonOK extends Button{
    
    public ButtonOK(final Stage dialogStage) {
        this.setText(GUIGenerator.getInstance().getLocaleText(Trans.SELECT));
        this.setDisable(true);
        this.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent t) {
                dialogStage.close();
                GUIGenerator.getInstance().createCharts();
            }
        });
    }
}
